package com.xybbs.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xybbs.entity.Tips;
import com.xybbs.service.TipsService;

@RequestMapping("main")
@Controller
public class MainController {
	@Autowired
	TipsService tipsService;
	
	@RequestMapping("toMainPage.do")
	public String toMainPage(HttpServletRequest req) {
		List<Tips> list = tipsService.checkAllWithUser();
		req.setAttribute("tips", list);
		return "main";
	}

}
